Prizm Content Connect
HTML5 Viewing

HTML5 viewing information.

GET Page/q/{PageNumber}/Attributes?DocumentID=[e,u]{ViewingSessionId}

This API requests or reads the information about a particular document page. The return information is a JSON string. The form has a query parameter, DocumentID, which can have for its value an un-encoded "u" prefix followed by the viewing session ID or a base 64 encoded viewing session ID prefixed with "e". The {PageNumber} parameter always begins with zero (0) for the first page within a document.

Http Method

GET

Resource URL

/PCCIS/V1/Page/q/{pageNumber}/Attributes?DocumentID=[e,u]{ViewingSessionId}& ContentType=[png, svg, svga]

Parameters

PageNumber

The page number of the document being requested. The first page within a document is always 0.

DocumentID

The Viewing Session ID.

ContentType

(Optional). The intended content of the page image. 

Request Body

Empty.

Response Body

If successful, this method returns an object with the following properties:

Property Name

Value

Description

version

String

The version of the viewer to consume this request.

contentType

String

The type of content that is available for this document.

imageBitDepth

Integer

The bit depth of the viewable content.

imageHeight

Integer

The height of the viewable content.

imageXResolution

Integer

The X resolution of the viewable content.

imageYResolution

Integer

The Y resolution of the viewable content.

Example
Copy Code
GET http://localhost:18681/PCCIS/V1/Page/q/0/Attributes?DocumentID=eOQA...
Example Response
Copy Code
{"version":"7.1","contentType":"jpeg,png,svg","imageBitDepth":16, "imageHeight":990,"imageWidth":765,"imageXResolution":0,"imageYResolution":0}

GET Page/q/{PageNumber}?DocumentID=[e,u]{ViewingSessionId}&Scale={ScaleValue}&ContentType=[jpeg, png, svg, svga]

This RESTful API returns a full page image. The Scale and ContentType query parameters affect the image with respect to the parameters intent. The ContentType parameter may have the following parameter value for now: JPEG, PNG, SVG or SVGA. If SVG or SVGA is chosen, the scale values are ignored as a SVG (vectored) stream is returned for which this parameter have no practical meaning. The scale query parameter with a value 1.0 gives a non-resized image. Less than 1.0 values shrink the image and larger than 1.0 values increase the image size.

SVGA is standard SVG content with additional optimizations to reduce the payload size. SVGA is not compatible with the Internet Explorer 10 browser, in which case SVG should be used instead.

Http Method

GET

Resource URL

/PCCIS/V1/Page/q/{PageNumber}?DocumentID=[e,u]{ViewingSessionId}&Scale={ScaleValue}&ContentType=[jpeg, png, svg, svga]

Parameters

PageNumber

The page number of the document being requested. The first page within a document is always 0.

DocumentID

The Viewing Session ID.

ScaleValue

The intended scale value of the page image. This is ignored for SVG streams.

ContentType

The intended content type of the page image.

Request Body

Empty.

Response Body

If successful, this method returns the requested page content.

Example
Copy Code
GET http://localhost:18681/PCCIS/V1/Page/q/0?DocumentID=eOQA5... &Scale=1&ContentType=svg

Example Response
Copy Code
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns=http://www.w3.org/2000/svg xmlns:cc="http://creativecommons.org/ns#" ...</svg>

GET Page/q/{PageNumber}/Tile/{x}/{y}/{width}/{height}?DocumentID=[e,u]{ViewingSessionId}&Scale={Scale Value}&ContentType=png

This request returns a tile of the requested document page. The tile is formed from the pixel coordinate specified by the x and y parameters and the width and height parameters. This tile is resized as determined by the scale factor. The contentTypeshould only be PNG for tiles as JPEG can cause artifact issues in alignment. Requesting SVG content will cause an error response as this content type is vector data and does need to be tiles like raster images. The scale query parameter with a value 1.0 gives a non-resized image. Less than 1.0 values shrink the tile and larger than 1.0 values increase the tile size.

Http Method

GET

Resource URL

/Page/q/{pageNumber}/Tile/{x}/{y}/{width}/{height}?DocumentID=[e,u]{ViewingSessionId}&Scale={Scale Value}&ContentType=png

Parameters

PageNumber

The page number of the document being requested. The first page within a document is always 0.

DocumentID

The Viewing Session ID.

Scale

The intended scale value of the page image. This is ignored for SVG streams.

ContentType

The intended content type of the page image.

x

The x coordinate of the requested tile relative to the original image.

y

The y coordinate of the requested tile relative to the original image.

width

The width of the requested tile.

height

The height of the requested tile.

Request Body

Empty.

Response Body

If successful, this method provides the requested page tile content.

Example
Copy Code
GET http://localhost:18681/PCCIS/V1/Page/q/0/ Tile/0/0/1275/1024?DocumentID=eOAA5... &Scale=1&Quality=100&ContentType=png

Example Response
Copy Code
Empty

GET Page/q/{PageNumber}/{Width}x{Height}?DocumentID=[e,u]{ViewingSessionId}&ContentType=[jpeg,png]

This request returns a thumbnail of the requested document page. The thumbnail size is constrained within the width and height pixel parameters and the aspect ratio of the image is maintained. The contentType can only be PNG or JPEG.

Http Method

GET

Resource URL

/Page/q/{pageNumber}/{width}x{height}?DocumentID=[e,u]{ViewingSessionId}&ContentType=[jpeg, png]

Parameters

PageNumber

The page number of the document being requested. The first page within a document is always 0.

DocumentID

The Viewing Session ID.

ContentType

The intended content type of the thumbnail page image.

width

The maximum width of the requested thumbnail.

height

The maximum height of the height of the requested thumbnail.

Request Body

Empty.

Response Body

If successful, this method provides the requested page thumbnail content.

Example
Copy Code
GET http://localhost:18681/PCCIS/V1/Page/q/0/ 200x300?DocumentID=eOAA5... &ContentType=png

Example Response
Copy Code
Empty

GET Document/q/Attributes?DocumentID=[e,u]{ViewingSessionId}&DesiredPageCountConfidence={PercentageValue}

This request returns a JSON string giving the page count of the document requested and the confidence value. Because page rendering may be different than what a file format may indicate for number of pages, there is a need for a confidence value indicating how confident the page count acquired will be prior to having all the pages generated. The DesiredPageCountConfidence parameter indicates what the minimum level required to be returned thus implying how long the request may take to return a precise value. The DesiredPageCountConfidence is segmented in this release where 50 percent or below may get an estimate page count value and above 50 percent will try to get a more accurate count. If apageCountConfidence value of less than 100 percent is returned, it means that the request is still being worked on and to try again if an accurate count is still desired.

Http Method

GET

Resource URL

Parameters

DocumentID

The Viewing Session ID.

DesiredPageCountConfidence

The intended percentage of confidence to use in determining the page count.

Request Body

Empty.

Response Body

If successful, this method returns an object with the following properties:

Property Name

Value

Description

pageCount

Integer

The determined number of pages in the document.

pageCountConfidence

Integer

If value is less than 100 it means that the page count is still being determined, and to try again if a more accurate count is needed.

Example
Copy Code
GET http://localhost:18681/PCCIS/V1/ Document/q/Attributes?DocumentID=eOQA5... &DesiredPageCountConfidence=50
Example Response
Copy Code
{"pageCount":3,"pageCountConfidence":100}

GET Document/q/{PageNumberBegin}-{PageNumberEnd}/Text?DocumentID=[e,u]{ViewingSessionId}

This request returns a JSON string containing the text extracted from the given document. The {PageNumberBegin} denotes the first page and {PageNumberEnd} denotes the last page to be included the extracted text. The lowest value for {PageNumberBegin} parameter is zero (0) – that indicates the first page within the document.

Http Method

GET

Resource URL

/PCCIS/V1/ Document/q/0-2/Text?DocumentID=eMAA2...

Parameters

DocumentID

The Viewing Session ID.

PageNumberBegin

The page to begin extracting text from.

PageNumberEnd

The page to end extracting text from.

Request Body

Empty.

Response Body

If successful, this method returns an object with the following properties:

Property Name

Value

Description

pages

List

A list of Nested Objects describing the extracted text for each of the pages in range.

pages.number

Integer

Denotes the number the current page to which the extracted text.belongs.

pages.text

String

Extracted text of the current page.

Example
Copy Code
GET http://localhost:18681/PCCIS/V1/Document/q/0-2/Text?DocumentID=eMAA2...
Example Response
Copy Code
{"pages":[{"number":0,"text":"Congratulations You have successfully installed Prizm Content Connect  www accusoft com  Page 1 of Document"},{"number":1, "text":"Page 2 of Document"},{"number":2,"text":"Page 3 of Document"}]}

 

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback